package com.tekj.cxqcb.view.Module.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.tekj.cxqcb.R;
import com.tekj.cxqcb.operation.resultBean.ApiShopServiceTypeBean;

import java.util.List;

public class ClassificationAdapter extends BaseQuickAdapter<ApiShopServiceTypeBean.DataBean, BaseViewHolder> {

    boolean isArrow = true;

    public void setArrow(boolean arrow) {
        isArrow = arrow;
    }

    public ClassificationAdapter(@Nullable List<ApiShopServiceTypeBean.DataBean> data) {
        super(R.layout.item_classification, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ApiShopServiceTypeBean.DataBean item) {
        helper.setText(R.id.tv_name, item.getTypeName());
        if (!isArrow) {
            helper.setGone(R.id.tv_content,true);
            helper.setText(R.id.tv_content,item.getTypeBrief());
        }
        helper.setGone(R.id.img_Arrow, isArrow);
    }
}
